package designpattern.compement;

/**
 * TODO:类描述
 *
 * @className: Client
 * @packageName: designpattern.compement
 * @author: Zhuhj
 * @version: V1.0
 * @date: 2021/4/19 22:42
 */
public class Client {
    public static void main(String[] args) {
        Compement rootFiles = new Files("root");
        Compement doc1 = new Doc("doc1");
        Compement doc2 = new Doc("doc2");

        Compement root1Files= new Files("root1");
        Compement root2Files= new Files("root2");

        Compement root11Files= new Files("root11");


        rootFiles.addCompement(doc1);
        rootFiles.addCompement(doc2);
        rootFiles.addCompement(root1Files);
        rootFiles.addCompement(root2Files);
        root1Files.addCompement(root11Files);


        rootFiles.display(1);

    }
}
